import { App } from 'vue';
import { registerControlProvider } from '@ibiz-template/runtime';
import { IBizCheckInGrid } from './checkin-grid';
import { CheckInGridProvider } from './checkin-grid.provider';
import CheckInGridColumn from './components/checkin-grid-column';

export default {
  install(app: App) {
    // 全局注册表格插件组件
    app.component(IBizCheckInGrid.name!, IBizCheckInGrid);
    app.component(CheckInGridColumn.name!, CheckInGridColumn);
    // 全局注册表格插件适配器，GRID_RENDER是插件类型，checkin-grid是插件标识
    registerControlProvider(
      'GRID_RENDER_CHECKIN',
      () => new CheckInGridProvider(),
    );
  },
};
